home *** CD-ROM | disk | FTP | other *** search
/ AOL File Library: 2,801 to 2,900 / aol-file-protocol-4400-2801-to-2900.zip / AOLDLs / C++ Files Library / Direct Blitting in C++ / Blitting.sit / Blitting ƒ / CCopier.h < prev    next >
Text File  |  1995-04-16  |  945b  |  45 lines

  1. // CCopier.h, the CCopier class definition, for image copying
  2. //
  3. // Copyright ⌐ 1995, Macneil Shonle. All rights reserved.
  4.  
  5. #ifndef __CCOPIER__
  6. #define __CCOPIER__
  7.  
  8. #ifndef __CDIRECTBLIT__
  9. #include <CDirectBlit.h>
  10. #endif
  11.  
  12. enum CopyMethod {
  13.     kDirect8To8,
  14.     kDirect8To4,
  15.     kQuickDraw
  16. };
  17.  
  18. enum SwapMethod {
  19.     kAutoSwap,
  20.     kCorrectAssumed
  21. };
  22.  
  23. class CCopier {
  24. public:
  25.     CCopier( CDirectBlit *inSource, CDirectBlit *inDest,
  26.              CopyMethod inCopy = kQuickDraw, SwapMethod inSwap = kAutoSwap );
  27.     
  28.     void SetSource( CDirectBlit *inSource );
  29.     void SetDest( CDirectBlit *inDest );
  30.     void SetCopyMethod( CopyMethod inCopy );
  31.     void SetSwapMethod( SwapMethod inSwap );
  32.     void operator()( Rect *sourceRect, Rect *destRect );
  33.     
  34. protected:
  35.     CDirectBlit* mSource;
  36.     CDirectBlit* mDest;
  37.     CopyMethod mCopyMethod;
  38.     SwapMethod mSwapMethod;
  39.     
  40. private:
  41.     void Direct8To8Copy( Rect *sourceRect, Rect *destRect );
  42.     void QuickDrawCopy( Rect *sourceRect, Rect *destRect );
  43. };
  44.  
  45. #endif